import request from "@/utils/request.ts";
import type {ResponseType, AttrResType, AttrType} from "@/api/product/attr/type.ts";

export const reqC1 = () => request.get<any,ResponseType>('/admin/product/getCategory1');
export const reqC2 = (id:number|null) => request.get<any,ResponseType>('/admin/product/getCategory2/'+id);
export const reqC3 = (id:number|null) => request.get<any,ResponseType>('/admin/product/getCategory3/'+id);
export const reqAttr = (id1:number|null,id2:number|null,id3:number|null) => request.get<any,AttrResType>(`/admin/product/attrInfoList/${id1}/${id2}/${id3}`);
export const reqAddOrUpdateAttr =(data:AttrType) => request.post("/admin/product/saveAttrInfo",data);
export const reqDeleteAttr = (id:number|null) => request.get(`/admin/product/deleteAttr/${id}`)